# !/usr/bin/env python
# -*- coding: UTF-8 -*-
# author: xiazhiquan
# date: Jul 23, 2011

import datetime
import random
import time

#while True:
a = random.randint(3, 22)
now = datetime.datetime.now()
print now
print a

###########################################
print '\n================================='

a = 1.7
b = 0.9 + 0.8  # This should be 1.7

print a
print b

if a == b:
    print "[float] a and b are equal."
else:
    print "[float] a and b are different !"

###########################################
print '\n================================='

a = 2
b = 1 + 2
if a == b:
    print '[int] a and b are equal.'
else:
    print '[int] a and b are different !'

###########################################
print '\n================================='
print time.localtime()

###########################################
print '\n================================='
today = datetime.date.today()
print today
now - datetime.datetime.now()
print now
print time.strftime("%Y-%m-%d %H:%M:%S")

###########################################
print '\n================================='
n = 0
while True:
    print n
    time.sleep(1)
    n += 1
    if n > 5:
        break


###########################################
print '\n================================='

print datetime.datetime.now().microsecond

print 'Finished!'


